package com.nft.service.school.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nft.service.school.entity.BookEntity;
import com.nft.service.school.resp.BookContentResp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
@DS("master")
public interface BookMapper extends BaseMapper<BookEntity> {
    @Select("select dict_code as dictCode, dict_value as dictValue from sys_dict_data where dict_type=#{dictType} order by dict_sort asc")
    public List<BookContentResp> selectDictByType(@Param("dictType")String dictType);
}
